<template>
<div>
  <h1 v-if="h1content.length>0">{{h1content}}</h1>
  <h2 v-if="h2content.length>0">{{h2content}}</h2>
  <p class="des" v-if="desContent.length>0">{{desContent}}</p>
  <div v-if="cardShow" class="card">
    <slot name="card"></slot>
  </div>
</div>
</template>

<script>
export default {
name: "display",
  props:{
    cardShow:{type:Boolean, default:true},

    h1content:{type:String, default:''},
    h2content:{type:String, default:''},
    desContent:{type:String, default:''},
  }
}
</script>

<style scoped>
h1{
  font-size: 28px;
  font-weight: 400;
  color: #1f2d3d;
  line-height: 50px;
}
h2{
  font-size: 22px;
  font-weight: 400;
  color: #1f2f3d;
  line-height: 50px;
}
.des{
  font-size: 14px;
  color: #5e6d82;
  line-height: 30px;
}
.card{
  width: 850px;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid #ebebeb;
  border-radius: 5px;
  /*box-shadow: 0 0 5px red;*/
}
.card:hover{
  box-shadow: 0 0 8px rgba(232,237,250,.6);
  transition: .2s;
}
</style>